<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="description" content="StreamSets Data Collector">
  <title ng-bind="common.title">StreamSets Data Collector</title>
  <base href="/" />
  <link rel="icon" type="image/png" href="assets/favicon.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <!-- compiled CSS --><% styles.forEach( function ( file ) { %>
  <link rel="stylesheet" type="text/css" href="/<%= file %>" /><% }); %>
</head>
<body>
  <div class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="header-container">
      <div class="navbar-header">
        <a class="logo" href="/">
          <img src="/assets/logo.png" />
        </a>
      </div>
    </div>
  </div>

  <div class="container login-container">
    <div class="row">
      <div id="loginErrorMessageDivId" class="col-xs-6 col-xs-offset-3 col-sm-5 col-sm-offset-4 col-md-4 col-md-offset-4 col-lg-4 col-lg-offset-4 alert alert-danger" role="alert">
        Log In Failed.
      </div>
    </div>

    <div class="row">
      <div class="col-xs-6 col-xs-offset-3 col-sm-5 col-sm-offset-4 col-md-4 col-md-offset-4 col-lg-4 col-lg-offset-4 form-login">
        <form class="form-horizontal clearfix" action="/login" method="POST">
          <h4>Log In</h4>
          <input type="text" id="usernameId" name="j_username" class="form-control" placeholder="username" autofocus="true"/>
          <input type="password" id="passwordId" name="j_password" class="form-control" placeholder="password" />
          <button type="submit" id="loginId" class="btn btn-primary pull-right">Log In <i class="fa fa-sign-in"></i></button>
        </form>
      </div>
    </div>
  </div>

  <script>
    var queryString = window.location.search;
    if(queryString && queryString.indexOf('error=true') !== -1) {
      var errorDiv = document.getElementById('loginErrorMessageDivId');
      errorDiv.style.visibility = 'visible';
    }
  </script>

</body>
</html>